package com.peng.pojo;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;

@Table(name = "tb_group_user", schema = "springboot-tuofu", catalog = "")
public class GroupUser implements Serializable {
    private int id;
    private Timestamp createTime;
    private Integer state;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "state")
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GroupUser groupUser = (GroupUser) o;
        return id == groupUser.id &&
                Objects.equals(createTime, groupUser.createTime) &&
                Objects.equals(state, groupUser.state);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, createTime, state);
    }
}
